package _15_generics._15_12;

/**
 * 参数类型 不能随子类型发生变化
 */
public class _06_OrdinaryArguments {
    public static void main(String[] args) {
        Base base = new Base();
        Derived derived = new Derived();
        DerviedSetter ds = new DerviedSetter();
        ds.set(base);
        ds.set(derived);
    }
}

class OrdinarySetter {
    void set(Base base){
        System.out.println("OrdinarySetter.set(Base)");
    }
}

class DerviedSetter extends OrdinarySetter {
    void set(Derived derived) {
        System.out.println("DerviedSetter.set(Derived)");
    }
}
